home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 1 / ACE CD 1.iso / files / utils / framema2.dms / in.adf / DEVELOPER / include / fm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-10  |  8.4 KB  |  268 lines

  1. /************************************************************************
  2.  
  3.  NAME               fm.h
  4.  
  5.  VERSION            2.00
  6.  
  7.  LAST EDIT          Monday 12-Apr-93 11:11:21
  8.  LOCKED BY          -
  9.  
  10.  DESCRIPTION        Header-File for framemachine.library-Functions
  11.  
  12.  HISTORY            Author  Date        Comment
  13.                     ---------------------------------------------------
  14.                     ds      07-04-93    first coding
  15.                     ds      12-04-93    DisplayInfo
  16.  
  17. *************************************************************************/
  18.  
  19. #ifndef __FM_H
  20. #define __FM_H
  21.  
  22. /* Flags returned from QueryFlags():    */
  23. #define FMFLG_DIGI_ON           0x0001  /* 1: Digitzer is active                */
  24. #define FMFLG_FRAME_LOADED      0x0002  /* 1: Frame on Display was loaded       */
  25. #define FMFLG_FRAME_DIGITIZED   0x0004  /* 1: Frame on Display was digitized    */
  26. #define FMFLG_411               0x0008  /* 1: Display is 411 (hires)            */
  27. #define FMFLG_211               0x0010  /* 1: Display is 211 (lores)            */
  28. #define FMFLG_400               0x0020  /* 1: Display is 400 (hires bw)         */
  29. #define FMFLG_200               0x0040  /* 1: Display is 200 (lores bw)         */
  30. #define FMFLG_422               0x0080  /* 1: Display is 422 (hires loaded)     */
  31. #define FMFLG_222               0x0100  /* 1: Display is 222 (lores loaded)     */
  32. #define FMFLG_SNAPSHOT          0x0200  /* 1: Frame was snapshoted              */
  33.  
  34. /* Flags for DisplayMode(): */
  35. #define PDP_OFF         0
  36. #define PDP_AMIGA       1
  37. #define PDP_PRISMA      2
  38. #define PDP_PRISMA_KEY  3
  39.  
  40. /* Sizes for DisplaySize(): */
  41. #define PDP_720 0
  42. #define PDP_360 1
  43. #define PDP_240 2
  44. #define PDP_180 3
  45. #define PDP_120 4
  46. #define PDP_90  5
  47. #define PDP_NUM_SIZE 6  /* # of available Sizes */
  48.  
  49. /* Sizes for FastPreview() */
  50. #define MD_QUATER   0
  51. #define MD_LORES    1
  52. #define MD_HIRES    2
  53.  
  54.  
  55. /* Flags for PrepRead():    */
  56. #define READ_COLOR  (1<<0)
  57. #define READ_BW     (1<<1)
  58. #define READ_FIRST  (1<<2)
  59. #define READ_SECOND (1<<3)
  60.  
  61. /* Flags for PrepWrite():   */
  62. #define WRITE_COLOR     (1<<0)
  63. #define WRITE_BW        (1<<1)
  64. #define WRITE_NO_422    (1<<2)
  65. #define WRITE_FORCE_720 (1<<3)
  66.  
  67. /* Flags for PrepSaveEDAN(): */
  68. #define EDAN_BW         (1<<0)
  69. #define EDAN_COLOR      (1<<1)
  70. #define EDAN_LACE       (1<<2)
  71. #define EDAN_RAM_BUFFER (1<<3)
  72. #define EDAN_NO_SYNC    (1<<5)
  73.  
  74. /* Flags for PrepLoadEDAN():    */
  75. #define EDAN_ORIGINAL_POS   (1<<4)
  76.  
  77.  
  78.  
  79.  
  80. /* Frame-Machine Preferences:   */
  81. struct   FMPref
  82. {
  83.     ULONG   sys_flags;              /* See Below    */
  84.     UWORD   display_size;           /* Display-Size */
  85.     UWORD   display_mode;           /* Display-Mode */
  86.     UWORD   key_mode;               /* Keymode      */
  87.     WORD    pos_x[PDP_NUM_SIZE];    /* X-Pos of Display for each Size   */
  88.     WORD    pos_y[PDP_NUM_SIZE];    /* Y-Pos of Display for each Size   */
  89.  
  90.     UBYTE       bri;
  91.     UBYTE       sat;
  92.     UBYTE       con;
  93.     UBYTE       red;
  94.     UBYTE       grn;
  95.     UBYTE       blu;
  96. };
  97. #define SYSFLG_VIDEO_NTSC   0x00000001  /* 1: NTSC 0: PAL           */
  98. #define SYSFLG_VIDEO_VCR    0x00000002  /* 1: VCR  0: TV            */
  99. #define SYSFLG_VIDEO_YC     0x00000004  /* 1: YC   0: CVBS          */
  100. #define SYSFLG_DUAL_MONITOR 0x00000008  /* Two Monitors attached    */
  101. #define SYSFLG_GENLOCK      0x00000010  /* Genlock attached         */
  102.  
  103. struct  FMDisplayInfo
  104. {
  105.     UWORD   size;       /* Display-Size             */
  106.     UWORD   mode;       /* Display-Mode,            */
  107.     UWORD   keymode;    /* Number of KeyMode        */
  108.     WORD    xpos;       /* X-Pos                    */
  109.     WORD    ypos;       /* Y-Pos                    */
  110.     UWORD   width;      /* Width                    */
  111.     UWORD   height;     /* Height                   */
  112. };
  113.  
  114. struct  EDANInfo
  115. {
  116.     ULONG   flags;      /* Flags        */
  117.     UWORD   size;       /* Size Mode    */
  118.     UWORD   width;      /* Width        */
  119.     UWORD   height;     /* Height       */
  120.      WORD   xpos,ypos;  /* X/Y-Position of Display when recorded    */
  121.      WORD   frame;      /* Current frame    */
  122.      WORD   nframe;     /* Number of frames */
  123.     UWORD   frame_id;   /* Unique Frame-ID  */
  124. };
  125.  
  126.  
  127.  
  128. typedef enum
  129. {
  130.     NO_ERROR,
  131.  
  132. /* Init-Errors: */
  133.     FMERR_OUT_OF_MEMORY_FATAL,
  134.     FMERR_NO_DOS_LIB,
  135.     FMERR_NO_EXPANSION_LIB,
  136.     FMERR_NO_GFX_LIB,
  137.     FMERR_NO_INTUI_LIB,
  138.     FMERR_NO_IFFPARSE_LIB,
  139.     FMERR_SEMAPHORE_NOT_UNIQUE,
  140.     FMERR_LOCKED,
  141.  
  142. /* Hardware-Errors: */
  143.     FMERR_NO_XILINX_FILE,             /* Xilinx-Errors:                       */
  144.     FMERR_NO_XILINX_RESPOND,
  145.     FMERR_XILINX_FILE_CORUPTED,
  146.     FMERR_XILINX_WRONG_VERSION,
  147.  
  148.     FMERR_ON_I2C_BUS,                 /* I2C-Errors                           */
  149.     FMERR_SAA9051_FAILED,
  150.     FMERR_SAA9065_FAILED,
  151.     FMERR_TDA4680_FAILED,
  152.  
  153.     FMERR_FM_NOT_FOUND,               /* FrameMachine not found               */
  154.     FMERR_PRISM_NOT_ATTACHED,         /* Prism is not attached                */
  155.     FMERR_NEED_DUAL,                  /* Need Dual-Monitor for requested mode */
  156.  
  157. /* Preferences-Errors:  */
  158.     FMERR_PREF_SIZE,                  /* Your PrefSize is not up-to-date      */
  159.     FMERR_NO_PREF_FILE,
  160.     FMERR_NVRAM_CORRUPTED,
  161.  
  162. /* General Errors:      */
  163.     FMERR_IN_PARAMETER,               /* Check your parameters                */
  164.     FMERR_OUT_OF_MEMORY,              /* Not enough memory                    */
  165.     FMERR_INTERNAL,                   /* Internal Error. Report this!         */
  166.     FMERR_MUST_PREPARE_FIRST,
  167.     FMERR_CANT_OPEN_READ,
  168.     FMERR_CANT_OPEN_WRITE,
  169.     FMERR_READ,
  170.     FMERR_WRITE,
  171.  
  172. /* ReadLine:  */
  173.     FMERR_REQUESTED_SIZE_TO_BIG,      /* Your size is larger than image-size  */
  174.     FMERR_LACE_NOT_POSSIBLE,          /* When DisplaySize < PDP_720, lace is not possible */
  175.  
  176. /* WriteLine: */
  177.     FMERR_PICTURE_TOO_LARGE,
  178.     FMERR_PICTURE_TOO_SMALL,
  179.  
  180. /* Preview:  */
  181.     FMERR_BMAP_TO_SMALL,
  182.     FMERR_NO_SCREEN,
  183.     FMERR_NO_WINDOW,
  184.  
  185. /* LoadFile():  */
  186.     FMERR_BAD_CMAP,
  187.     FMERR_BAD_ILBM_FILE,
  188.     FMERR_BAD_RGB8_FILE,
  189.     FMERR_BAD_YUVN_FILE,
  190.     FMERR_UNKNOWN_IFF_TYPE,
  191.     FMERR_UNKNOWN_COMPRESSION,
  192.     FMERR_FROM_IFFPARSE_LIB,
  193.  
  194. /* Save EDAN:   */
  195.     FMERR_TOO_MANY_FRAMES,
  196.  
  197. /* Load EDAN:   */
  198.     FMERR_NOT_EDAN_FORMAT,
  199.     FMERR_OLD_EDAN_FORMAT,
  200.     FMERR_NEW_EDAN_FORMAT,
  201.     FMERR_EDAN_CORRUPTED,
  202.     FMERR_BOE,                /* End Of EDAN      */
  203.     FMERR_EOE,                /* Beginn Of EDAN   */
  204.  
  205.  
  206.     NUMBER_OF_FM_ERRORS,
  207. } ERRORS;
  208.  
  209.  
  210. extern VOID     LockFM(VOID);
  211. extern WORD     TryLockFM(VOID);
  212. extern VOID     UnLockFM(VOID);
  213. extern UBYTE*   WhoLocksFM(VOID);
  214.  
  215. extern WORD     SendI2C(UBYTE  *table, UWORD size);
  216. extern WORD     DisplaySize(UWORD mode);
  217. extern WORD     DisplayPos(WORD *x,  WORD *y);
  218. extern WORD     DisplayMode(UWORD flags,  UWORD keymode);
  219. extern WORD     QuerySize(UWORD mode,  UWORD *width, UWORD *height);
  220. extern WORD     SnapShot(VOID);
  221. extern WORD     GetDisplayInfo(struct FMDisplayInfo *info);
  222. extern WORD     SetDisplayInfo(struct FMDisplayInfo *info);
  223. extern WORD     DigiState(BOOL on);
  224. extern BOOL     PrismAttached(VOID);
  225. extern WORD     ClearDisplay(VOID);
  226.  
  227. extern WORD     GetFMPrefs(struct FMPref *pref, UWORD size);
  228. extern WORD     GetSavedPrefs(struct FMPref *pref, UWORD size);
  229. extern WORD     GetDefaultPrefs(struct FMPref *pref, UWORD size);
  230. extern WORD     UsePrefs(struct FMPref *pref, UWORD size);
  231. extern WORD     SavePrefs(struct FMPref *pref, UWORD size);
  232.  
  233. extern UBYTE    *ExplainStatus(WORD status);
  234. extern VOID     DisplayStatus(WORD err);
  235.  
  236. extern WORD     PrepRead(UWORD width, UWORD height, UWORD flags);
  237. extern WORD     EndRead(VOID);
  238. extern WORD     ReadRGB24Line(UBYTE *r, UBYTE *g, UBYTE *b);
  239. extern WORD     ReadBW8Line(UBYTE *bw);
  240.  
  241. extern WORD     PrepWrite(UWORD width, UWORD height, UWORD flags, UBYTE *rlut, UBYTE *glut, UBYTE *blut);
  242. extern WORD     EndWrite(VOID);
  243. extern WORD     WriteRGB24Line(UBYTE *r, UBYTE *g, UBYTE *b);
  244. extern WORD     WriteBW8Line(UBYTE *y);
  245.  
  246. extern WORD     LoadFile(UBYTE  *fname, UWORD flags);
  247.  
  248. extern WORD     FastPreviewBmap(struct BitMap *bmap,struct Window *win, UWORD mode);
  249. extern WORD     FastPreview(UWORD mode);
  250.  
  251. extern WORD     PrepSaveEDAN(UBYTE *fname, WORD nf, UWORD flags);
  252. extern WORD     EndSaveEDAN(VOID);
  253. extern WORD     RecordFrame(VOID);
  254. extern WORD     QueryEDAN(struct EDANInfo *i);
  255.  
  256. extern WORD PrepLoadEDAN(UBYTE *fname, UWORD flags);
  257. extern WORD EndLoadEDAN(VOID);
  258. extern WORD GotoFrame(UWORD n);
  259. extern WORD NextFrame(VOID);
  260. extern WORD PreviousFrame(VOID);
  261. extern WORD FirstFrame(VOID);
  262. extern WORD LastFrame(VOID);
  263. extern WORD SaveYUVN(UBYTE *name);
  264. #endif
  265.  
  266.  
  267.  
  268.